package com.qin.mall.controller;

import com.qin.mall.common.api.CommonResult;
import com.qin.mall.domain.OmsCompanyAddress;
import com.qin.mall.service.OmsCompanyAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 收货地址管理Controller
 * @author Leisure
 * create 2022 2022/11/10 14:27
 **/
@RestController
@RequestMapping("/Address")
public class OmsCompanyAddressController {
    
    @Autowired
    private OmsCompanyAddressService companyAddressService;

    /**
     * 获取全部收货地址
     */
    @GetMapping("/list")
    public CommonResult<List<OmsCompanyAddress>> list(){
        List<OmsCompanyAddress> list = companyAddressService.getList();
        return CommonResult.success(list);
    }
    
}
